package io;

import java.io.*;
import java.nio.charset.StandardCharsets;

public class PWDemo {
    public static void main(String[] args) throws IOException {
        PrintWriter pw=new PrintWriter("pw.txt");
        pw.println("啊啊啊，我滴妻，王氏宝钏");
        pw.println("写出完毕");
        pw.close();
        /*FileOutputStream fos=new FileOutputStream("pw.txt");//文件流
        OutputStreamWriter osw=new OutputStreamWriter(fos, StandardCharsets.UTF_8);//转换流
        BufferedWriter bw=new BufferedWriter(osw);//缓冲字符流
        bw.write("啊啊啊，我滴妻，王氏宝钏");
        bw.write("啊啊啊,五环，你比四环多一环");
        System.out.println("写出完毕");
        bw.close();

         */
    }
}
